package com.bestvike.stone.spring.shiro.authc;

import com.bestvike.stone.spring.shiro.auth.Auth;
import com.bestvike.stone.spring.shiro.authc.exception.AuthenticationException;

/**
 * 认证器
 */
public interface Authenticator {
    /**
     * 登录
     *
     * @param token 登录信息
     * @return 认证结果
     * @throws AuthenticationException 登录失败异常
     */
    Auth login(AuthenticationToken token) throws AuthenticationException;

    /**
     * 登出
     *
     * @param token 令牌
     */
    void logout(String token);
}
